import type { PageType } from '../../../lib/page_handler/type'
import type { ModulePlatformConfig } from '../types'
import { SUPPORTED_PLATFORMS } from '../../../types/constants'
import { EffectType, SYMBOLS } from '../../../types/interfaces'
import { AppModule } from '../types'

export function getContentModules(_pageType: PageType): ModulePlatformConfig {
  return {
    [AppModule.CopyCopyright.id]: {
      meta: {
        name: '移除复制版权',
        description: '移除复制时添加的版权信息',
        category: 'content',
        icon: `${SYMBOLS.DOCUMENTS.DOCUMENT_WITH_PAGE}${SYMBOLS.UI.COPY}`,
        status: 'not-needed',
        defaultEnabled: true,
        effectType: EffectType.IMMEDIATE,
      },
      supportedPlatforms: {
        [SUPPORTED_PLATFORMS.CSDN]: {
          status: 'supported',
        },
        [SUPPORTED_PLATFORMS.ZHI_HU]: {
          status: 'supported',
        },
        [SUPPORTED_PLATFORMS.JIAN_SHU]: {
          status: 'supported',
        },
        [SUPPORTED_PLATFORMS.JUE_JIN]: {
          status: 'supported',
        },
      },
    },
    [AppModule.CopyProtection.id]: {
      meta: {
        name: '代码复制',
        description: '一键复制代码，无需登录',
        category: 'content',
        icon: `${SYMBOLS.DOCUMENTS.DOCUMENT_WITH_PAGE}${SYMBOLS.NETWORK.UNLOCK}`,
        status: 'not-needed',
        defaultEnabled: true,
        effectType: EffectType.MIXED,
      },
      supportedPlatforms: {
        [SUPPORTED_PLATFORMS.CSDN]: {
          status: 'supported',
        },
        [SUPPORTED_PLATFORMS.ZHI_HU]: {
          status: 'supported',
        },
        [SUPPORTED_PLATFORMS.JUE_JIN]: {
          status: 'supported',
        },
        [SUPPORTED_PLATFORMS.FIVE_ONE_CTO]: {
          status: 'supported',
        },
      },
    },
    [AppModule.PayWallHandler.id]: {
      meta: {
        name: '移除关注阅读',
        description: '绕过需要关注才能阅读全文的限制',
        category: 'content',
        icon: `${SYMBOLS.DOCUMENTS.DOCUMENT_WITH_PAGE}${SYMBOLS.UI.MONEY_OFF}`,
        status: 'not-needed',
        defaultEnabled: true,
        effectType: EffectType.MIXED,
      },
      supportedPlatforms: {
        [SUPPORTED_PLATFORMS.CSDN]: {
          status: 'supported',
        },
      },
    },
  }
}
